<?php include(APPLICATION_PATH.'modules/hm-poll/views/scripts/common/navigation.phtml'); ?>
<h2 class="title">Listar</h2>
<?php if($this->rowcount > 0) { ?>
<table>
	<thead>
		<tr class="box">
			<td>Pergunta</td>
			<td></td>
		</tr>
	</thead>
	<tfooter></tfooter>
	<tbody>
		<?php foreach($this->list_poll as $list_poll) : ?>
			<tr>
				<td><a href="<?= $this->url(array('action'=>'show','id'=>$list_poll['id'])) ?>"><?php echo $list_poll['question']; ?></a></td>
				<td>
					<a href="<?= $this->url(array('action'=>'edit','id'=>$list_poll['id'])) ?>">Editar</a> |
					<a href="<?= $this->url(array('action'=>'delete','id'=>$list_poll['id'])) ?>">Excluir</a> |
					<a href="<?= $this->url(array('action'=>'answers','id'=>$list_poll['id'])) ?>">Respostas</a>
				</td>
			</tr>
		<?php endforeach; ?>
	</tbody>
</table>
<?php } else { ?>
	<div class="clear error prepend-top">Nenhum registro encontrado.</div>
<?php } ?>